package org.stvd.repository.common.impl;

import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
import org.stvd.entities.common.VerifyTmp;
import org.stvd.entities.common.VerifyTmpPK;
import org.stvd.repository.base.impl.BaseDaoImpl;
import org.stvd.repository.common.VerifyTmpDao;

@Repository("VerifyTmpDao")
public class VerifyTmpDaoImpl extends BaseDaoImpl<VerifyTmp> implements VerifyTmpDao{

    @Transactional
    public void updateVerifyTmp(VerifyTmp verifyTmp) {
        em.merge(verifyTmp);
    }

    @Transactional
    public void deleteVerifyTmp(VerifyTmpPK verifyTmpPK) {
        VerifyTmp verifyTmp = em.find(VerifyTmp.class, verifyTmpPK);
        if (verifyTmp != null) {
            em.remove(verifyTmp);
        }
    }
    
    @Transactional
    public VerifyTmp findByPK(VerifyTmpPK verifyTmpPK) {
        return em.find(VerifyTmp.class, verifyTmpPK);
    }

}
